import java.sql.Connection;

public class UserDaoTest{
	public static void main(String[] args){
		DBConnection dbc = new DBConnection();
		Connection conn = dbc.createConnection();
		UserDao dao = new UserDao();
		
		User user = new User("timec","123123","김동준");
		
		/*
		 * table 생성
		 */
		dao.createTable(conn);
		
		
		/*
		 * table 값 입력
		 */
		dao.insertUser(conn, user);
		
		
		/*
		 * table 값 조회
		 */
		dao.selectUser(conn, "timec");
		
		
		/*
		 * table 값 갱신
		 */
		user.setName("드림인프라");
		user.setPassword("567567");
		dao.updateUser(conn, user);
		dao.selectUser(conn, "timec");
		
		
		/*
		 * table 값 삭제
		 */
		dao.deleteUser(conn, "timec");
		
		
		dbc.destroyConnection();
	}
}
